#include "../glutil/GLee.h"
#include "POVMesh.h"

#include <QFutureWatcher>
#include <QGLWidget>
#include <QtConcurrentMap>
#include <QTime>

#include <math.h>
#include "../geom/Ray.h"

#include "POVObject.h"

using namespace POVGeom;

void POVMesh::addMeshToOctree(Octree<Triangle> * octree)
{
	int numTris = m_mesh->getNumberOfTris();
	BBox b = octree->getBBox();

	for(int i = 0; i<numTris;++i)
	{
		Triplet<MeshPoint> tri = m_mesh->getTriangle(i);
		Triangle t(tri[0].p,tri[1].p,tri[2].p);
		octree->addObject( t );
	}
}


